Skip to content

Conversation

CDRussell
Copy link
Member

@CDRussell CDRussell commented Sep 1, 2025

Task/Issue URL: https://app.asana.com/1/137249556945/project/608920331025315/task/1211197010246724?focus=true

Description

Adds the core webflow to support a guided bookmark import based on Google Takeout.

  • This PR is only about the flow itself
    • does not contain the final UI that will come before, during and after the import flow (future PR to add this)
    • does not contain timeouts / error handling if automation doesn't complete
    • does not make it available yet to production code, accessible through Autofill Dev Settings screen for internal builds to test
  • ℹ️ don't interact with the WebView while the automation is running; in a later PR it won't be possible to interact with it during this flow
Screenshot 2025-09-24 at 16 02 57

Steps to test this PR

First time import

  • Fresh install internal build type from this branch
  • Open Settings->Autofill Dev Settings
  • Tap on Launch Bookmarks import flow
  • You won't be signed in yet, so sign in to your Google account when prompted
  • After signing in, verify that automation takes care of the rest and you eventually leave the web flow and see the success snackbar.
  • Tap on View Bookmarks and verify they imported under a Imported from Chrome folder

Subsequent import (already signed in)

  • Tap on Launch Bookmarks import flow again. This time, you're already signed so verify it jumps straight into the automation (and that it succeeds)
  • Verify in View Bookmarks that there is only one Imported From Chrome folder (bookmarks will be duplicated within that folder (it's known we're matching existing bookmark importer behaviour within that folder, including not further de-duplicating so if you import n times you'll see n sets of copies of bookmarks in that one folder)

Check autofill works

  • Manually add your Google credentials to our password manager
  • Tap on Google Account Logout (from the import passwords section) to logout of Google
  • Tap on Launch Bookmarks import flow again.
  • Verify you are prompted to autofill; accept
  • Verify the rest of the flow is automated and you don't have to manually enter your password again

@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_bookmarks_webflow branch 2 times, most recently from 402a647 to f0c110e Compare September 2, 2025 10:15
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_feature_flag branch from 3333dc7 to 2621c66 Compare September 15, 2025 12:18
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_bookmarks_webflow branch 3 times, most recently from 7afffb4 to d7ee151 Compare September 16, 2025 16:37
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_feature_flag branch from 2621c66 to eda2570 Compare September 17, 2025 16:41
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_bookmarks_webflow branch 2 times, most recently from afcb488 to 072a68b Compare September 19, 2025 10:34
@CDRussell CDRussell changed the base branch from feature/craig/streamline_import_add_feature_flag to graphite-base/6707 September 19, 2025 13:35
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_bookmarks_webflow branch from 072a68b to a3608d0 Compare September 19, 2025 13:35
@CDRussell CDRussell changed the base branch from graphite-base/6707 to feature/craig/streamline_import_bookmarks_takeout_zip September 19, 2025 13:35
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_bookmarks_webflow branch from a3608d0 to b84aeb9 Compare September 19, 2025 13:36
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_bookmarks_webflow branch 2 times, most recently from 262315f to 569981b Compare September 19, 2025 14:03
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_bookmarks_webflow branch 3 times, most recently from 00d8ed5 to bb529d0 Compare September 19, 2025 15:17
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_bookmarks_takeout_zip branch from 1b6e8bb to 01d5515 Compare September 19, 2025 15:17
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_bookmarks_webflow branch 4 times, most recently from 4dd4efd to ca99169 Compare September 23, 2025 11:26
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_bookmarks_takeout_zip branch from 01d5515 to 1dfcbd0 Compare September 23, 2025 11:32
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_bookmarks_webflow branch 4 times, most recently from b217c11 to 0003be7 Compare September 24, 2025 14:18
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_bookmarks_webflow branch 2 times, most recently from a714667 to a8e4b48 Compare September 26, 2025 10:49
@CDRussell CDRussell requested a review from Copilot September 26, 2025 10:49
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 26 out of 31 changed files in this pull request and generated 5 comments.

@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_bookmarks_webflow branch 8 times, most recently from 5f1c36c to 9b60bed Compare September 26, 2025 14:56
@CDRussell CDRussell marked this pull request as ready for review September 26, 2025 15:08
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_bookmarks_webflow branch 3 times, most recently from 74686f2 to d5ec240 Compare September 29, 2025 11:16
@CDRussell CDRussell force-pushed the feature/craig/streamline_import_add_bookmarks_webflow branch from d5ec240 to 00f7fb3 Compare September 30, 2025 10:01
Copy link
Contributor

@cmonfortep cmonfortep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flow works great 👍

Nothing to flag, great work!

}
}

private fun isTakeoutZipDownloadLink(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything is an OR here, but I wonder if something should be AND. For example, url.contains(".zip") should be true always right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's ok with OR as we don't want to be too prescriptive that we miss the download. Really, we should only hit the download flow for a takeout zip and nothing else so the guards are just a light touch in terms of validating. If the URL changes to not include zip for instance, but it was still a takeout zip to download we should still continue.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good, ok

entry = zipInputStream.nextEntry
}

return ExtractionResult.Error(Exception("Chrome/Bookmarks.html not found in file"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just thinking about this, from observability PoV. Should we differentiate between Errors vs We extracted but no file found?

Errors I see them as something went wrong, but here is User doesn't have bookmarks?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be if Chrome bookmarks data wasn't chosen for the export, not that they don't have any bookmarks to export so I think this is is a valid error scenario

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, I thought it could happen on accounts without bookmarks or similar. What you describe, with the automated flow, that makes sense then. As if it's unchecked could indicate auto-flow broken.

Not sure what the real behavior will be on production, if the user will be able to interact with the page, even if it's automated. If that happens, they could uncheck bookmarks and check something else. Just something to consider if it's possible.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the user will be able to interact with the page, even if it's automated

It won't be possible as the WebView will only show when user interaction is required to sign in / authenticate. A WIP demo available here: https://app.asana.com/1/137249556945/task/1210496756809250/comment/1211529725151990?focus=true

@CDRussell CDRussell merged commit 14be2ac into develop Oct 1, 2025
24 checks passed
@CDRussell CDRussell deleted the feature/craig/streamline_import_add_bookmarks_webflow branch October 1, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants